HAL CORTEX MPU functions migration ¶
Note
The MPU migration functions are divided according to their ARM Architecture. Each Architecture contains multiple CORTEX versions that are used in your STM32 series.
For example:
ARMv8-M: CORTEX-M33 (STM32U5…)
ARMv7-M: CORTEX-M7, CORTEX-M4 (STM32H7, STM32L4…)
ARMv6-M: CORTEX-M0, CORTEX-M0+ (STM32F0, STM32U0…)
You can find your Series in ST website: Link ( https://www.st.com/en/microcontrollers-microprocessors/stm32-32-bit-arm-cortex-mcus.html)
HAL_MPU_Enable ¶
|
HAL1 |
HAL2 |
|---|---|
|
The function
|
This function has been updated and renamed to
Functionality Update:
|
void HAL_MPU_Enable(uint32_t MPU_Control)
|
void HAL_CORTEX_MPU_Enable(hal_cortex_mpu_hardfault_nmi_state_t fault_state,
hal_cortex_mpu_unmapped_addr_fault_t priv_default_state)
|
HAL_MPU_Disable ¶
|
HAL1 |
HAL2 |
|---|---|
|
The function
|
This function has been renamed to
|
void HAL_MPU_Disable(void)
|
void HAL_CORTEX_MPU_Disable(void)
|
HAL_MPU_EnableRegion ¶
|
HAL1 |
HAL2 |
|---|---|
|
The function
|
This function has been updated and renamed to
Functionality Update:
|
void HAL_MPU_EnableRegion(uint32_t RegionNumber)
|
void HAL_CORTEX_MPU_EnableRegion(hal_cortex_mpu_region_idx_t region_idx)
|
HAL_MPU_DisableRegion ¶
|
HAL1 |
HAL2 |
|---|---|
|
The function
|
This function has been updated and renamed to
Functionality Update:
|
void HAL_MPU_DisableRegion(uint32_t RegionNumber)
|
void HAL_CORTEX_MPU_DisableRegion(hal_cortex_mpu_region_idx_t region_idx)
|
HAL_MPU_ConfigRegion ¶
|
HAL1 |
HAL2 |
|---|---|
|
The function
|
This function has been updated and renamed to
Functionality Update:
|
void HAL_MPU_ConfigRegion(const MPU_Region_InitTypeDef
*const pMPU_RegionInit)
|
hal_status_t HAL_CORTEX_MPU_SetConfigRegion(hal_cortex_mpu_region_idx_t region_idx,
const hal_cortex_mpu_region_config_t *p_config)
|
- Related use cases:
HAL_MPU_ConfigMemoryAttributes ¶
|
HAL1 |
HAL2 |
|---|---|
|
The function
Functionality:
|
This function has been divided into two separate functions:
Functionality Split:
|
void HAL_MPU_ConfigMemoryAttributes(const MPU_Attributes_InitTypeDef
*const pMPU_AttributesInit)
|
void HAL_CORTEX_MPU_SetDeviceMemAttr(hal_cortex_mpu_mem_attr_idx_t attr_idx,
hal_cortex_mpu_device_mem_attr_t mem_attr)
void HAL_CORTEX_MPU_SetCacheMemAttr(hal_cortex_mpu_mem_attr_idx_t attr_idx,
hal_cortex_mpu_normal_mem_cache_attr_t mem_attr)
|
- Related use cases:
Note
The MPU Not Secure functions are only available with ARMv8-M Architecture or above.
HAL_MPU_Enable_NS ¶
|
HAL1 |
HAL2 |
|---|---|
|
The function
|
This function has been renamed to
|
void HAL_MPU_Enable_NS(void)
|
void HAL_CORTEX_MPUNS_Enable(void)
|
HAL_MPU_Disable_NS ¶
|
HAL1 |
HAL2 |
|---|---|
|
The function
|
This function has been renamed to
|
void HAL_MPU_Disable_NS(void)
|
void HAL_CORTEX_MPUNS_Disable(void)
|
HAL_MPU_EnableRegion_NS ¶
|
HAL1 |
HAL2 |
|---|---|
|
The function
|
This function has been renamed to
|
void HAL_MPU_EnableRegion_NS(void)
|
void HAL_CORTEX_MPUNS_EnableRegion(void)
|
HAL_MPU_DisableRegion_NS ¶
|
HAL1 |
HAL2 |
|---|---|
|
The function
|
This function has been renamed to
|
void HAL_MPU_DisableRegion_NS(void)
|
void HAL_CORTEX_MPUNS_DisableRegion(void)
|
HAL_MPU_ConfigRegion_NS ¶
|
HAL1 |
HAL2 |
|---|---|
|
The function
|
This function has been renamed to
|
void HAL_MPU_ConfigRegion_NS(void)
|
void HAL_CORTEX_MPUNS_SetConfigRegion(void)
|
HAL_MPU_ConfigMemoryAttributes_NS ¶
|
HAL1 |
HAL2 |
|---|---|
|
The function
|
This function has been split into
|
void HAL_MPU_ConfigMemoryAttributes_NS(void)
|
void HAL_CORTEX_MPUNS_SetDeviceMemAttr(void)
void HAL_CORTEX_MPUNS_SetCacheMemAttr(void)
|